<include file="Common:header" />
<!-- /. NAV SIDE  -->
<include file="Common:left" />
<!-- /. NAV SIDE  -->
<div id="page-wrapper">
	<div class="header">
		<h1 class="page-header">
			会员管理 <small>Welcome HS_ERP</small>
		</h1>
		<ol class="breadcrumb">
			<li><a href="{:U('Index/index')}">首页</a></li>
			<li class="active">修改密码</li>
		</ol> 
	</div>
	<div id="page-inner">
		<div class="row">
			<div class="col-xs-12">
				<!--Formlist content-->
				<div class="panel panel-default">
					<div class="panel-body">
						<form class="layui-form" action="">
							<input type="hidden" name='id' value="">
							<div class="layui-form-item">
								<label class="layui-form-label" style="width:100px">原始密码</label>
								<div class="layui-input-block">
								  <input type="password" name="login_pass" required  lay-verify="required" placeholder="请输入原始密码" autocomplete="off" class="layui-input">
								</div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label" style="width:100px">新密码</label>
								<div class="layui-input-block">
								  <input type="password" name="newPasswd" required  lay-verify="required" placeholder="请输入新密码" autocomplete="off" class="layui-input">
								</div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label" style="width:100px">重复密码</label>
								<div class="layui-input-block">
								  <input type="password" name="repeatNewPasswd" required  lay-verify="required" placeholder="请输入重复密码" autocomplete="off" class="layui-input">
								</div>
							</div>
							<div class="layui-form-item">
								<div class="layui-input-block">
								  <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
								  <button type="reset" class="layui-btn layui-btn-primary">重置</button>
								</div>
						  </div>
						</form>
					</div>
				</div>
				<!--Formlist content-->
			</div>
		</div>
	</div>
	<include file="Common:foot" />
	 <!-- /. PAGE INNER  -->
	 <script>
		layui.use('form', function(){
		  var form = layui.form;
		  //监听提交
		  form.on('submit(formDemo)', function(data){
				var cont = data.field;
				$.ajax({
					url:"{:U('member/chanagePasswd')}",
					type:'post',
					dataType:'json',
					data:cont,
					success:function(data){
						if(data.code==0){
							layer.alert(data.message);
						}else{
							layer.alert(data.message, function(index){
								//do something
								window.parent.location.reload();
								var index = parent.layer.getFrameIndex(window.name); 
								parent.layer.close(index);
							});
						}
					}
				});	
				//layer.msg(JSON.stringify(data.field));
				return false;
		  });
		});
	</script>
</div>
<include file="Common:footer" />
    